import { request } from "@/api";
import { API } from "@/api/modules/dwh/typings";

/** upload POST /file/upload */
export async function uploadUsingPOST(body: string, options?: { [key: string]: any }) {
  return request<API.FileInfo>("/file/upload", {
    method: "POST",
    data: body,
    ...(options || {})
  });
}

/** uploadPlatform POST /file/upload-platform */
export async function uploadPlatformUsingPOST(body: string, options?: { [key: string]: any }) {
  return request<API.FileInfo>("/file/upload-platform", {
    method: "POST",
    data: body,
    ...(options || {})
  });
}

/** uploadPlatform POST /file/upload-request */
export async function uploadPlatformUsingPOST_2(options?: { [key: string]: any }) {
  return request<API.FileInfo>("/file/upload-request", {
    method: "POST",
    ...(options || {})
  });
}

/** upload2 POST /file/upload2 */
export async function upload2UsingPOST(body: string, options?: { [key: string]: any }) {
  return request<string>("/file/upload2", {
    method: "POST",
    data: body,
    ...(options || {})
  });
}

/** uploadImage POST /file/uploadImage */
export async function uploadImageUsingPOST(body: string, options?: { [key: string]: any }) {
  return request<API.FileInfo>("/file/uploadImage", {
    method: "POST",
    data: body,
    ...(options || {})
  });
}
